Skip to content

Conversation

@bep
Copy link
Member

@bep bep commented Jan 15, 2026

This adds a new publish command that:

  1. Publishes a draft GitHub release (sets draft: false)
  2. Updates a Homebrew cask in a tap repository with the new release

The Homebrew cask update points to the universal macOS pkg and extracts
the SHA256 from the checksums file generated during release.

Co-Authored-By: Claude Opus 4.5 [email protected]

@bep bep force-pushed the feat/publish branch 5 times, most recently from 46c3abc to 068bb80 Compare January 15, 2026 16:53
This adds a new `publish` command that:
1. Publishes a draft GitHub release (sets draft: false)
2. Updates a Homebrew cask in a tap repository with the new release

The Homebrew cask update finds the .pkg archive from the release archives
using a path pattern matcher (consistent with how builds/archives/releases
work), extracts the SHA256 from the checksums file, and commits the cask
file to the tap repository.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 61.04513% with 164 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.44%. Comparing base (515cd9f) to head (17e461c).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
cmd/publishcmd/publish.go 69.65% 45 Missing and 16 partials ⚠️
internal/config/publish_config.go 57.77% 29 Missing and 9 partials ⚠️
internal/releases/github.go 0.00% 37 Missing ⚠️
internal/publish/publishformats/publishformats.go 41.17% 9 Missing and 1 partial ⚠️
internal/config/decode.go 14.28% 4 Missing and 2 partials ⚠️
internal/config/build_config.go 40.00% 2 Missing and 1 partial ⚠️
internal/config/config.go 70.00% 2 Missing and 1 partial ⚠️
internal/config/release_config.go 25.00% 2 Missing and 1 partial ⚠️
cmd/releasecmd/release.go 88.23% 2 Missing ⚠️
internal/releases/checksums.go 87.50% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #47       +/-   ##
===========================================
+ Coverage   16.86%   65.44%   +48.57%     
===========================================
  Files          36       39        +3     
  Lines        2182     2616      +434     
===========================================
+ Hits          368     1712     +1344     
+ Misses       1764      696     -1068     
- Partials       50      208      +158     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

bep and others added 2 commits January 15, 2026 18:31
- Update all.txt with publish assertions
- Add dedicated publish.txt test for homebrew cask functionality

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Instead of parsing the checksums file in the publish command,
store SHA256 values directly in BuildArchPath during the release
step. This makes the checksum data available programmatically
and avoids fragile file parsing.

- Add SHA256 field to BuildArchPath struct
- Update CreateChecksumLines to return ChecksumResult with map
- Update release command to populate SHA256 in ArchsCompiled
- Simplify publish command to use archPath.SHA256 directly

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@bep bep force-pushed the feat/publish branch 3 times, most recently from 0d8416b to 17e461c Compare January 16, 2026 01:05
Follow the archives pattern: top-level publish_settings for shared
defaults and a publishers slice where each entry can match specific
releases via paths and has its own type (built-in or plugin).

- Add internal/publish/publishformats package with Format enum
- Rewrite publish_config.go with Publisher struct and PublishType
- Add Publishers field to Config struct
- Update core.go to compile publisher -> release mappings
- Rewrite publishcmd to iterate over publishers
- Update test scripts and hugoreleaser.yaml

Built-in publisher types:
- github_release: Undrafts the GitHub release
- homebrew_cask: Updates Homebrew cask file
- _plugin: External plugin (future)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@bep bep marked this pull request as ready for review January 16, 2026 15:30
@bep bep merged commit c24d454 into main Jan 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants